<template>
  <div class="top-range">
    <div class="header bg-yellow text-center font-bolder">
      <font class="font30" color="#000080">『</font>
      <font class="font30" color="#FF0000">张</font>
      <font class="font30" color="#0000FF">大</font>
      <font class="font30" color="#FF00FF">仙</font>
      <font class="font30" color="#008080">』</font>
      <font face="微软雅黑" class="font30">→顶尖区</font>
      <font face="微软雅黑" color="#008000" class="font48"
        >〖资料永久免费〗</font
      >
    </div>
    <div class="notice bg-green text-center">
      <font class="font16" color="#800080">
        张大仙通知:为
        <a
          target="_blank"
          href="/bbs/kongbai.htm#一码中特"
          style="text-decoration: none"
          ><font color="#800080">了</font></a
        >让广大彩民信任，发布者不许发布假料.偷改资料，否则将取消上榜置顶资格，望广大彩民一起监督！</font
      >
    </div>
    <template v-for="(item, index) of data.topRange">
      <div
        :style="{
          borderBottom:
            index < data.topRange.length - 1
              ? '0.1rem solid #00ffff'
              : 0,
        }"
        class="item-content font35 text-center font-bolder"
        @click="toPage(item.url)"
      >
        <font class="black"
          >{{ item.period }}：{{ item.title
          }}<span class="red">{{ item.content }}</span
          >{{ item.desc }}</font
        >
      </div>
    </template>
  </div>
</template>
<script setup>
import BoxContainer from "@/components/BoxContainer.vue";
import { onMounted, reactive } from "vue";
import { getApiTopRangeData } from "@/api/api";

const data = reactive({
  topRange: [],
});
const toPage = (url) => {
  window.open(url);
};
onMounted(() => {
  getTopRangeData()
})
const getTopRangeData = () => {
  getApiTopRangeData({type:2,style:1}).then(res => {
    data.topRange = res
  })
}
</script>
<style lang="less" scoped>
.top-range {
  background: #fff;
  border: 0.1rem solid #00ffff;
}
.header {
  padding: 5px 0;
}
.item-content {
  cursor: pointer;
  padding: 0.8rem 0;
}
</style>
